package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="COM_QUERYPRI"
 *     
*/
public class ComQuerypri implements Serializable {

    /** identifier field */
    private String cqpGuid;

    /** nullable persistent field */
    private String tableName;

    /** nullable persistent field */
    private String fieldName;

    /** nullable persistent field */
    private String comCondition;

    /** nullable persistent field */
    private String state;

    /** full constructor */
    public ComQuerypri(String cqpGuid, String tableName, String fieldName, String comCondition, String state) {
        this.cqpGuid = cqpGuid;
        this.tableName = tableName;
        this.fieldName = fieldName;
        this.comCondition = comCondition;
        this.state = state;
    }

    /** default constructor */
    public ComQuerypri() {
    }

    /** minimal constructor */
    public ComQuerypri(String cqpGuid) {
        this.cqpGuid = cqpGuid;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="CQP_GUID"
     *         
     */
    public String getCqpGuid() {
        return this.cqpGuid;
    }

    public void setCqpGuid(String cqpGuid) {
        this.cqpGuid = cqpGuid;
    }

    /** 
     *            @hibernate.property
     *             column="TABLE_NAME"
     *             length="50"
     *         
     */
    public String getTableName() {
        return this.tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    /** 
     *            @hibernate.property
     *             column="FIELD_NAME"
     *             length="50"
     *         
     */
    public String getFieldName() {
        return this.fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    /** 
     *            @hibernate.property
     *             column="COM_CONDITION"
     *             length="300"
     *         
     */
    public String getComCondition() {
        return this.comCondition;
    }

    public void setComCondition(String comCondition) {
        this.comCondition = comCondition;
    }

    /** 
     *            @hibernate.property
     *             column="STATE"
     *             length="1"
     *         
     */
    public String getState() {
        return this.state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("cqpGuid", getCqpGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof ComQuerypri) ) return false;
        ComQuerypri castOther = (ComQuerypri) other;
        return new EqualsBuilder()
            .append(this.getCqpGuid(), castOther.getCqpGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getCqpGuid())
            .toHashCode();
    }

}
